<?php
abstract class Pageley_Controller_Command_TransactionalRead extends Pageley_Controller_Command_Abstract {

	private $properties;
    private $unitOfWork;

    public function __construct($unitOfWork) {
        $this->unitOfWork = $unitOfWork;
        $this->properties = new Pageley_Util_ArrayMap();
	}

    public function set($propertyName, $value) {
        $this->properties->put($propertyName, $value);
    }

    protected function get($propertyName) {
        return $this->properties->get($propertyName);
    }

    protected function getProperties() {
        return $this->properties;
    }
    
    protected function getSuccessAction() {
        return new Pageley_Controller_Action_Rollback($this->getUnitOfWork());
    }

	protected function getFailureAction() {
        return new Pageley_Controller_Action_Rollback($this->getUnitOfWork());
	}

	protected function getUnitOfWork() {
		return $this->unitOfWork;
	}

}